package com.lord.action;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.lord.dao.GoddessDao;
import com.lord.model.Goddess;

public class GoddessAction {

    public void add(Goddess goddess) throws Exception {
        GoddessDao dao = new GoddessDao();
        dao.add(goddess);
    }

    public Goddess get(Integer id) throws SQLException {
        GoddessDao dao = new GoddessDao();
        return dao.get(id);
    }

    public void edit(Goddess goddess) throws SQLException {
        GoddessDao dao = new GoddessDao();
        dao.update(goddess);
    }

    public void del(Integer id) throws SQLException {
        GoddessDao dao = new GoddessDao();
        dao.delete(id);
    }

    public List<Goddess> query() throws Exception {
        GoddessDao dao = new GoddessDao();
        return dao.select();
    }

    public List<Goddess> query(List<Map<String, Object>> params) throws Exception {
        GoddessDao dao = new GoddessDao();
        return dao.select(params);
    }

}
